{include file="public/header" /}
<main class="thinkask-main">
  <div class="container">
    <div class="row">
        <section class="col-lg-9">
               <h1 class="title">搜索-<span style="color:orange">{$keyword}</span></h1>
               <p>{$site_name}一共为您找到了大约{$count}条结果</p>
                 {volist name="all" id="result"}
                  {if condition="$result.type=='question'"}
                   <div style="text-decoration: underline; font-size: 17px;">
					<a href="/question/{$result.id}">
						{$result.title}
					</a>
				</div>
				<div style="text-align: left; margin-top: 0px; color: #666; font-size: 12px;">
					共有{$result.answer_count}条回复，
					该问题发表时间：{$result.addtime}
				</div>
				<div class="content" style="color: #333;">
					{$result.message}
				</div>
				<div style="width: 100%; height: 0px; border-top: 1px black dashed; margin-bottom: 10px;" /></div>
			{elseif condition="$result.type=='article'"}
			    <div style="text-decoration: underline; font-size: 17px;">
			        <a href="/article/{$result.id}">
			            {$result.title}
			        </a>
			    </div>
			    <div style="text-align: left; margin-top: 0px; color: #666; font-size: 12px;">
					该文章发表时间：{$result.addtime}
				</div>
				<div class="content" style="color: #333;">
					{$result.message}
				</div>
				<div style="width: 100%; height: 0px; border-top: 1px black dashed; margin-bottom: 10px;" /></div>
			{elseif condition="$result.type=='topic'"}
			    <div style="text-decoration: underline; font-size: 17px;">
			        <a href="/topic/{$result.id}">
			            {$result.title}
			        </a>
			    </div>
			    <div style="text-align: left; margin-top: 0px; color: #666; font-size: 12px;">
					该话题添加时间：{$result.addtime}
				</div>
				<div style="width: 100%; height: 0px; border-top: 1px black dashed; margin-bottom: 10px;" /></div>
			{elseif condition="$result.type=='user'"}
			    <div style="text-decoration: underline; font-size: 17px;">
			        <a href="/user/{$result.id}">
			            {$result.title}
			        </a>
			    </div>
			    <div style="text-align: left; margin-top: 0px; color: #666; font-size: 12px;">
					{$site_name}用户
				</div>
				<div style="width: 100%; height: 0px; border-top: 1px black dashed; margin-bottom: 10px;" /></div>
			{/if}
                 {/volist}
                 
            {if condition="($count gt 10)AND($count lt 21)"}
	            <ul class="pagination">
	            <li><a title="第一页" href="?keyword={$keyword}&type={$type}&page=1">1</a></li>
	            <li><a title="第二页" href="?keyword={$keyword}&type={$type}&page=2">2</a></li>
	            </ul>
            {elseif condition="($count gt 20)AND($count lt 31)"}
                <ul class="pagination">
	            <li><a title="第一页" href="?keyword={$keyword}&type={$type}&page=1">1</a></li>
	            <li><a title="第二页" href="?keyword={$keyword}&type={$type}&page=2">2</a></li>
	            <li><a title="第三页" href="?keyword={$keyword}&type={$type}&page=3">3</a></li>
	            </ul>
            {elseif condition="$count gt 30"}
	            <ul class="pagination">
	            <li><a title="首页" href="?keyword={$keyword}&type={$type}&page=1">《</a></li>
	            <li><a title="第一页" href="?keyword={$keyword}&type={$type}&page=1">1</a></li>
	            <li><a title="第二页" href="?keyword={$keyword}&type={$type}&page=2">2</a></li>
	            <li><a title="第三页" href="?keyword={$keyword}&type={$type}&page=3">3</a></li>
	            <li><a title="尾页" href="?keyword={$keyword}&type={$type}&page={$page_count}">》</a></li>
	            </ul>
            {/if}
        </section>
      </div>
    </div>
</main>

{include file="public/footer" /}